import 'package:flutter/cupertino.dart';
import 'package:wch/generated/json/base/json_field.dart';
import 'package:wch/generated/json/patient_detail.g.dart';
import 'dart:convert';

@JsonSerializable()
class PatientDetailEntity {
	int? id;
	int? hospitalId;
	int? doctorId;
	int? num;
	String? templateName;
	String? adminUser;
	String? createTime;
	String? updateTime;
	List<PatientDetailList>? list;

	PatientDetailEntity();

	factory PatientDetailEntity.fromJson(Map<String, dynamic> json) => $PatientDetailEntityFromJson(json);

	Map<String, dynamic> toJson() => $PatientDetailEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class PatientDetailList {
	int? id;
	int? templateId;
	String? name;
	String? text;
	int? type;
	String? status;
	String? label;
	///增加辅助属性
	TextEditingController? controller;
	int? minLength;

	PatientDetailList();

	factory PatientDetailList.fromJson(Map<String, dynamic> json) => $PatientDetailListFromJson(json);

	Map<String, dynamic> toJson() => $PatientDetailListToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}